<?php
namespace app\home\validate;

use think\Validate;

class EquipmentCheck  extends Validate
{
    protected $rule = [
        'name' => 'require',
        'in_time' => 'require',
        'out_time' => 'require',
        'code' => 'require',
        'num' => 'require',
        'original_value' => 'require',
        'loss_rate' => 'require',
        'id' => 'require',
    ];

    protected $message = [
        'name.require' => '名称不能为空',
        'id.require' => '缺少更新条件',
        'in_time.require' => '缺少开始时间',
        'out_time.require' => '缺少结束时间',
        'code.require' => '缺少固定资产编码',
        'num.require' => '缺少数量',
        'original_value.require' => '缺少原值',
        'loss_rate.require' => '缺少残值率',
    ];

    protected $scene = [
        'add' => ['name','in_time','out_time','code','num','original_value','loss_rate'],
        'edit' => ['id','name','in_time','out_time','code','num','original_value','loss_rate'],
    ];
}
